#!/usr/bin/env python3
# -*- coding:utf-8 -*-
# ======================================================
# @File:      : test283
# @Author     : forward_huan
# @Date       : 2024/11/16 17:39
# @Desc       :
# ======================================================
from typing import List


class Solution:
    def moveZeroes(self, nums: List[int]) -> None:
        """
        Do not return anything, modify nums in-place instead.
        """
        zero_count = 0
        for i, num in enumerate(nums):
            if num != 0:
                nums[i - zero_count] = num
            else:
                zero_count += 1
        for i in range(len(nums) - zero_count, len(nums)):
            nums[i] = 0
        print(nums)


print(Solution().moveZeroes(nums=[0, 1, 0, 3, 12]))
print(Solution().moveZeroes(nums=[0]))
